//
//  QKRecommandCell.m
//  Gigle
//
//  Created by 丁乾坤 on 2016/10/20.
//  Copyright © 2016年 丁乾坤. All rights reserved.
//

#import "QKTopicCell.h"

@implementation QKTopicCell

- (void)awakeFromNib {
    [super awakeFromNib];
//    self.headImage.layer.masksToBounds = YES;
//    self.headImage.layer.cornerRadius = 12.5;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (void)setTopicModel:(ListContent *)topicModel{
    _topicModel = topicModel;
    NSLogFunc
    [self.dingButton setTitle:topicModel.up.stringValue forState:UIControlStateNormal];
    [self.caiButton setTitle:topicModel.down.stringValue forState:UIControlStateNormal];
    [self.shareButton setTitle:topicModel.forward.stringValue forState:UIControlStateNormal];
    [self.commonButton setTitle:topicModel.comment.stringValue forState:UIControlStateNormal];
    self.descLabel.text = topicModel.text;
    self.timeLabel.text = topicModel.passtime;
    ListUser *user = topicModel.u;
    self.nameLabel.text = user.name;
    [self.headImage sd_setImageWithURL:[NSURL URLWithString:user.header.firstObject] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        
    }];
    
}

@end
